package cn.skyquant.quant4j.api.strategy;

import java.io.Serializable;
import java.util.Objects;

public class StrategyTestStatisticsTotal implements Serializable {
    private static final long serialVersionUID = 1L;
    public final int tradeLavel;//交易级别
    public double tp = 0;//总盈利
    public double sl = 0;//总亏损
    public double profit = 0;//最后盈利
    public int tpnum = 0;//盈利交易次数
    public int slnum = 0;//亏损交易次数
    public int num = 0;//总交易次数
    public long tptime = 0;//盈利交易耗时
    public long sltime = 0;//亏损交易耗时
    public long time;//总耗时
    public double tpamount = 0;//盈利交易仓位
    public double slamount  = 0;//亏损交易仓位
    public double amount ;//总仓位
    public int tpdist = 0;//盈利交易距离
    public int sldist  = 0;//亏损交易距离
    public int dist ;//总距离

    public StrategyTestStatisticsTotal(int tradeLavel) {
        this.tradeLavel = tradeLavel;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof StrategyTestStatisticsTotal)) return false;
        StrategyTestStatisticsTotal total = (StrategyTestStatisticsTotal) o;
        return tradeLavel == total.tradeLavel;
    }

    @Override
    public int hashCode() {
        return Objects.hash(tradeLavel);
    }
}
